<?php
/**
 * 获取每日考勤记录详情bll
 */
apf_require_class("Bll_BLL");
class Bll_Attendance_LeaveRecordLog extends BLL{


    /**
     * 根据leave id 获取请假日志
     *
     * @param mixed $ids
     * @access public
     * @return void
     */
    public function get_log_by_ids($ids) {
        $result = array();
        if(empty($ids)) {
            return $result;
        }
        if(is_array($ids)) {
            $ids = implode(',',$ids);
            $where["leave_id IN($ids) AND 1=?"] = 1;
            $result = $this->get_app_dao()->find($where,'id asc',0,0);
        } else {
            $where['leave_id'] = $ids;
            $result = $this->get_app_dao()->find($where,'id asc',0,0);
        }
        return $result;
    }

    /**
     * @return Dao_Attendance_LeaveRecord
     */
    private function get_app_dao(){
        return $this->get_dao('Dao_Attendance_LeaveRecordLog');
    }
}
